package cc.higou.service;

import cc.higou.core.pojo.TestTb;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

/**
 * 测试SpringMVC的配置
 * @author Lenovo
 *
 */
@Controller
public class CenterController {

	@Autowired
	private TestTbService testTbService;
	
	@RequestMapping(value="/test/index.do")
	public String index(Model model){
		model.addAttribute("hh", "你好");

		TestTb testTb = new TestTb();
		testTb.setName("你真美丽");
		testTb.setBirthday(new Date());
		testTbService.add(testTb);
		return "index";
	}
}
